<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get array of locales for which there is data</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="intlcalendar.getactualminimum.html">« IntlCalendar::getActualMinimum</a></li>
      <li style="float: right;"><a href="intlcalendar.getdayofweektype.html">IntlCalendar::getDayOfWeekType »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.intlcalendar.html">IntlCalendar</a></li>
    <li>Get array of locales for which there is data</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="intlcalendar.getavailablelocales" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlCalendar::getAvailableLocales</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8, PECL &gt;= 3.0.0a1)</p><p class="refpurpose"><span class="refname">IntlCalendar::getAvailableLocales</span> &mdash; <span class="dc-title">Get array of locales for which there is data</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlcalendar.getavailablelocales-description">
  <h3 class="title">说明</h3>
  <p class="para">
   面向对象风格
  </p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>IntlCalendar::getAvailableLocales</strong></span>(): <span class="type">array</span></div>

  <p class="para rdfs-comment">
   过程化风格
  </p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>intlcal_get_available_locales</strong></span>(): <span class="type">array</span></div>

  <p class="para rdfs-comment">
   Gives the list of locales for which calendars are installed. As of ICU 51,
   this is the list of all installed ICU locales.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlcalendar.getavailablelocales-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlcalendar.getavailablelocales-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   An <span class="type">array</span> of <span class="type">string</span>s, one for which locale. 
  </p>
 </div>



 <div class="refsect1 examples" id="refsect1-intlcalendar.getavailablelocales-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2395">
   <p><strong>示例 #1 <span class="function"><strong>IntlCalendar::getAvailableLocales()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">IntlCalendar</span><span style="color: #007700">::</span><span style="color: #0000BB">getAvailableLocales</span><span style="color: #007700">());</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; af
    [1] =&gt; af_NA
    [2] =&gt; af_ZA
    [3] =&gt; agq
    [4] =&gt; agq_CM
    [5] =&gt; ak
    [6] =&gt; ak_GH
    [7] =&gt; am
    [8] =&gt; am_ET
    [9] =&gt; ar
    [10] =&gt; ar_001
    [11] =&gt; ar_AE
    [12] =&gt; ar_BH
    [13] =&gt; ar_DJ
    … output abbreviated …
    [595] =&gt; zh_Hant_HK
    [596] =&gt; zh_Hant_MO
    [597] =&gt; zh_Hant_TW
    [598] =&gt; zu
    [599] =&gt; zu_ZA
)
</pre></div>
    </div>
   </div>
  </p>
 </div>



</div></div></div></body></html>